package cn.yx.framework.configuration;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * 系统全局常量
 *
 * @author chenw
 * @create 2017-01-04 17:11
 * @email javacspring@gmail.com
 */
public class RegexConstant {
    public static String EMAIL = "^([a-z0-9A-Z]+[-|\\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\\.)+[a-zA-Z]{2,}$";
    public static String Mobile = "^((13[0-9])|(15[^4,\\D])|(18[0,5-9]))\\d{8}$";

    public static boolean match(String rule, String content) {
        return Pattern.compile(rule).matcher(content).matches();
    }
}
